package com.briup.smartcity_group1.config;

import com.briup.smartcity_group1.web.mapping.CustomRequestMappingHandlerMapping;
import org.springframework.boot.autoconfigure.web.servlet.WebMvcRegistrations;
import org.springframework.context.annotation.Configuration;
import org.springframework.core.Ordered;
import org.springframework.core.annotation.Order;
import org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping;

/**
 * 不同包下的controller uri 前缀不同
 * @author Hanqi <jpanda@aliyun.com>
 * @since 2019/3/13 16:11
 */
@Configuration
@Order(Ordered.HIGHEST_PRECEDENCE)
public class PackageUriWebMvcConfiguration implements WebMvcRegistrations {
    @Override
    public RequestMappingHandlerMapping getRequestMappingHandlerMapping() {
        return new CustomRequestMappingHandlerMapping();
    }
}